#ifndef _ATOM_H
#define _ATOM_H

/** 
    \addtogroup Atom
*/
/*@{*/

/**
   Typedef to make it easier to change the resolution of atom coordinates.  
*/
typedef int cart;

/**
   One atom or hetatm entry in a pdb file corresponds to one atom
   struct.  Generally, these atom structs are placed an a store.  The
   position within the store corresponds to the serialNumber of the
   HETATM or ATOM entry.  Because the PDB gives TER records serial
   numbers, TER records are given dummy, placeholder atom structs.
*/
struct atom {
  /** The atom serial number from the pdb. */
  int serialNumber;
  /** Units are in milli-Angstroms.  (This allows us to store them as integers, 
      and to preserve the full resolution of the PDB..) */
  cart x;
  cart y;
  cart z;

  /** Which chain is this atom on?*/
  char chain;

  /**
     The residue serial number within the pdb file 
  */
  int residue;
  /** 
      PDB temperature field
  */
  int temperature;
  /**
     Standard one or two letter element abbreviaion.  Right justified.
     The PDB doesn't support atoms with exotic three letter codes, and
     neither do we.
  */
  char element [2];
  /**
     The PDB atom name.  Search for pdb atom field documentation for
     more information.  Generally contains extra structural
     information, especially for amino acids.
  */
  char name[4];
  /**
     The standard one letter abbreviation for this amio acid type.
  */
  char residue_type;
  /**
     The pdb altLoc field.
  */
  char altLoc;
};


/** Returns the distance between two atoms in milli-Angstroms.  (The same unit that is
    used above.
    
    Right now, this uses the (double) floating point square root...oh well.

 */
double atom_distance(struct atom * a, struct atom * b);
void atom_print(struct atom *a);
/*@}*/
#endif //_ATOM_H
